/*
 * @Author: szx
 * @Date: 2022-04-06 20:36:32
 * @LastEditTime: 2022-04-06 20:38:49
 * @Description:
 * @FilePath: \learn\八股文\正则表示式\test.js
 */
const pattern = /((?:ninja-)+)sword/;
// const pattern = /((ninja-)+)sword/;
// const pattern = /(ninja-)+sword/;
const ninjas = 'ninja-ninja-sword'.match(pattern);
console.log(ninjas);
